package servlets;

import java.util.Date;
import java.util.Properties;

import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.AddressException;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;

public class email {
	Properties props = new Properties();
	Session session = Session.getInstance(props);
	Message msg = new MimeMessage(session);
	
//	msg.setFrom(new InternetAddress(""));
	public void derp() throws AddressException, MessagingException{
		msg.setFrom(new InternetAddress("from"));
		
		InternetAddress[] iaa = {new InternetAddress("andrew.c.wedekind@gmail.com")};
		msg.setRecipients(Message.RecipientType.TO, iaa);
		
		msg.setSubject("Account Recovery");
		msg.setSentDate(new Date());
		
		msg.setText("login info");
		
		Transport.send(msg);
	}
}
